import request from '@/utils/request'

export const listTMResult = (search) =>
  request({
    url: '/tMResult',
    method: 'get',
    params: {
      offset: search.offset,
      limit: search.limit,
      name: search.name
    }
  })

export const saveResult = (result) =>
  request({
    url: '/tMResult',
    method: 'post',
    data: result
  })

export const getResultById = (id) =>
  request({
    url: '/tMResult/' + id,
    method: 'get'
  })

export const updateResult = (id, result) =>
  request({
    url: '/tMResult/updateResult/' + id,
    method: 'put',
    data: result
  })

export const addResult = (idCard, result) =>
  request({
    url: '/tMResult/addResult/' + idCard,
    method: 'post',
    data: result
  })

export const listAllResult = () =>
  request({
    url: '/tMResult/all',
    method: 'get'
  })

export const removeResult = (id) =>
  request({
    url: '/tMResult/' + id,
    method: 'delete'
  })

export const queryQPZQuestion = (id) =>
  request({
    url: '/tAssessQuestion/queryQPZQuestion/'+id,
    method: 'get'
  })


export const queryJLQuestion = (id) =>
  request({
    url: '/tAssessQuestion/queryJLQuestion/'+id,
    method: 'get'
  })
export const queryKBQuestion = (id) =>
  request({
    url: '/tAssessQuestion/queryKBQuestion/'+id,
    method: 'get'
  })


  export const queryQPZQuestions = () =>
  request({
    url: '/tAssessQuestion/queryQPZQuestion',
    method: 'get'
  })


export const queryJLQuestions = () =>
  request({
    url: '/tAssessQuestion/queryJLQuestion',
    method: 'get'
  })
export const queryKBQuestions = () =>
  request({
    url: '/tAssessQuestion/queryKBQuestion',
    method: 'get'
  })

